﻿@using NTQOnlineExam.Services.Infrastructure.MVC
@using NTQOnlineExamFrontend.Models
@model NTQOnlineExamFrontend.Models.LoginModel
@{
    ViewBag.PageTitle = this.LocalResources("WelcomeMessage");
    Layout = "~/Views/Shared/_Login.cshtml";
}
<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
    <div class="sign-form">
        <div class="sign-inner">
            <h3 class="first-child">Sign In To Your Account</h3>
            <hr>
            @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { }))
            { 
                @Html.AntiForgeryToken()
                @Html.ValidationSummary(true) 
                
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-user"></i></span>
                    @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", placeholder = "Username" })
                </div>@*
                @Html.ValidationMessageFor(m => m.UserName)
                *@<br>
                <div class="input-group">
                    <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                    @Html.PasswordFor(m => m.Password, new { @class = "form-control", placeholder = "Password" })
                </div>@*
                @Html.ValidationMessageFor(m => m.Password)
                *@<div class="checkbox">
                    <label>
                        @Html.CheckBoxFor(m => m.RememberMe) Remember me
                    </label>
                </div>
                <button class="btn btn-red" type="submit">Login</button>
                <hr />
                   
            }
            <p>Not registered? <a href="@Url.RouteUrl(new { Controller = "Account", Action = "Register" })">Create an account.</a></p>
            <div class="pwd-lost">
                <div class="pwd-lost-q show">Forgot your password? <a href="#">Click here to reset it.</a></div>
                <div class="pwd-lost-f hidden">
                    <p class="text-muted">Enter your email address below and we will send you a link to reset your password.</p>
                     @{
                        Html.RenderPartial("_ForgotPassword", new ForgotPasswordModel());
                    }
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $('.pwd-lost > .pwd-lost-q > a').on('click', function () {
        $(".pwd-lost > .pwd-lost-q").toggleClass("show hidden");
        $(".pwd-lost > .pwd-lost-f").toggleClass("hidden show animated fadeIn");
        return false;
    });
</script>